package com.zb.Service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.zb.Service.RoomkindService;
import com.zb.entity.Roomkind;
import com.zb.mapper.RoomkindMapper;


@Component("RoomkindService")
public class RoomkindServiceImpl implements RoomkindService{
	@Autowired
	private RoomkindMapper rm;
	public List<Roomkind> findRoomkindAll() {
		return rm.findRoomkindAll();
	}
	public void delectRoomKind(int id) {
		rm.delectRoomKind(id);
		
	}
	public void saveRoomKind(Roomkind r) {
		rm.saveRoomKind(r);
		
	}
	public List<Roomkind> findRoomKind(String start, String end) {
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("start", start);
		params.put("end", end);
		return rm.findRoomKind(params);
	}
	public Roomkind getRoomKindById(int rid) {
		
		return rm.getRoomKindById(rid);
	}
	

}